home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1997 / MacHack 1997.toast / Hacks / Hacks ’97 / Finder Dungeon / source code / MoreFiles 1.4.6 / Pascal Interfaces / MoreFiles.p < prev    next >
Encoding:
Text File  |  1997-06-28  |  6.3 KB  |  224 lines  |  [TEXT/MPS ]

  1. UNIT MoreFiles;
  2.  
  3. {    Apple Macintosh Developer Technical Support                                }
  4. {                                                                            }
  5. {    The long lost high-level and FSSpec File Manager functions.                }
  6. {    by Jim Luther, Apple Developer Technical Support Emeritus                }
  7. {                                                                            }
  8. {    File:        MoreFiles.p                                                    }
  9. {                                                                            }
  10. {    Copyright © 1992-1996 Apple Computer, Inc.                                }
  11. {    All rights reserved.                                                    }
  12. {                                                                            }
  13. {    You may incorporate this sample code into your applications without        }
  14. {    restriction, though the sample code has been provided "AS IS" and the    }
  15. {    responsibility for its operation is 100% yours.  However, what you are    }
  16. {    not permitted to do is to redistribute the source as "DSC Sample Code"    }
  17. {    after having made changes. If you're going to re-distribute the source,    }
  18. {    we require that you make it clear in the source that the code was        }
  19. {    descended from Apple Sample Code, but that you've made changes.            }
  20.  
  21.  
  22. INTERFACE
  23.  
  24.     USES
  25.         Types, Files;
  26.  
  27. {***************************************************************************}
  28.  
  29.  
  30.     FUNCTION HGetVolParms (volName: StringPtr;
  31.                                     vRefNum: Integer;
  32.                                     VAR volParmsInfo: GetVolParmsInfoBuffer;
  33.                                     VAR infoSize: LongInt): OSErr;
  34.  
  35.     FUNCTION HCreateMinimum (vRefNum: Integer;
  36.                                     dirID: LongInt;
  37.                                     fileName: Str255): OSErr;
  38.  
  39.     FUNCTION FSpCreateMinimum ({CONST}
  40.                                     VAR spec: FSSpec): OSErr;
  41.  
  42.     FUNCTION ExchangeFiles (vRefNum: Integer;
  43.                                     srcDirID: LongInt;
  44.                                     srcName: Str255;
  45.                                     dstDirID: LongInt;
  46.                                     dstName: Str255): OSErr;
  47.  
  48.     FUNCTION ResolveFileIDRef (volName: StringPtr;
  49.                                     vRefNum: Integer;
  50.                                     fileID: LongInt;
  51.                                     VAR parID: LongInt;
  52.                                     fileName: StringPtr): OSErr;
  53.  
  54.     FUNCTION FSpResolveFileIDRef (volName: StringPtr;
  55.                                     vRefNum: Integer;
  56.                                     fileID: LongInt;
  57.                                     VAR spec: FSSpec): OSErr;
  58.  
  59.     FUNCTION CreateFileIDRef (vRefNum: Integer;
  60.                                     parID: LongInt;
  61.                                     fileName: Str255;
  62.                                     VAR fileID: LongInt): OSErr;
  63.  
  64.     FUNCTION FSpCreateFileIDRef ({CONST}
  65.                                     VAR spec: FSSpec;
  66.                                     VAR fileID: LongInt): OSErr;
  67.  
  68.     FUNCTION DeleteFileIDRef (volName: StringPtr;
  69.                                     vRefNum: Integer;
  70.                                     fileID: LongInt): OSErr;
  71.  
  72.     FUNCTION FlushFile (refNum: Integer): OSErr;
  73.  
  74.     FUNCTION LockRange (refNum: Integer;
  75.                                     rangeLength: LongInt;
  76.                                     rangeStart: LongInt): OSErr;
  77.  
  78.     FUNCTION UnlockRange (refNum: Integer;
  79.                                     rangeLength: LongInt;
  80.                                     rangeStart: LongInt): OSErr;
  81.  
  82.     FUNCTION GetForeignPrivs (vRefNum: Integer;
  83.                                     dirID: LongInt;
  84.                                     name: StringPtr;
  85.                                     foreignPrivBuffer: Ptr;
  86.                                     VAR foreignPrivSize: LongInt;
  87.                                     VAR foreignPrivInfo1: LongInt;
  88.                                     VAR foreignPrivInfo2: LongInt;
  89.                                     VAR foreignPrivInfo3: LongInt;
  90.                                     VAR foreignPrivInfo4: LongInt): OSErr;
  91.  
  92.     FUNCTION FSpGetForeignPrivs ({CONST}
  93.                                     VAR spec: FSSpec;
  94.                                     foreignPrivBuffer: Ptr;
  95.                                     VAR foreignPrivSize: LongInt;
  96.                                     VAR foreignPrivInfo1: LongInt;
  97.                                     VAR foreignPrivInfo2: LongInt;
  98.                                     VAR foreignPrivInfo3: LongInt;
  99.                                     VAR foreignPrivInfo4: LongInt): OSErr;
  100.  
  101.     FUNCTION SetForeignPrivs (vRefNum: Integer;
  102.                                     dirID: LongInt;
  103.                                     name: StringPtr;
  104.                                     foreignPrivBuffer: Ptr;
  105.                                     VAR foreignPrivSize: LongInt;
  106.                                     foreignPrivInfo1: LongInt;
  107.                                     foreignPrivInfo2: LongInt;
  108.                                     foreignPrivInfo3: LongInt;
  109.                                     foreignPrivInfo4: LongInt): OSErr;
  110.  
  111.     FUNCTION FSpSetForeignPrivs ({CONST}
  112.                                     VAR spec: FSSpec;
  113.                                     foreignPrivBuffer: Ptr;
  114.                                     VAR foreignPrivSize: LongInt;
  115.                                     foreignPrivInfo1: LongInt;
  116.                                     foreignPrivInfo2: LongInt;
  117.                                     foreignPrivInfo3: LongInt;
  118.                                     foreignPrivInfo4: LongInt): OSErr;
  119.  
  120.     FUNCTION HGetLogInInfo (volName: StringPtr;
  121.                                     vRefNum: Integer;
  122.                                     VAR loginMethod: Integer;
  123.                                     userName: StringPtr): OSErr;
  124.  
  125.     FUNCTION HGetDirAccess (vRefNum: Integer;
  126.                                     dirID: LongInt;
  127.                                     name: StringPtr;
  128.                                     VAR ownerID: LongInt;
  129.                                     VAR groupID: LongInt;
  130.                                     VAR accessRights: LongInt): OSErr;
  131.  
  132.     FUNCTION FSpGetDirAccess ({CONST}
  133.                                     VAR spec: FSSpec;
  134.                                     VAR ownerID: LongInt;
  135.                                     VAR groupID: LongInt;
  136.                                     VAR accessRights: LongInt): OSErr;
  137.  
  138.     FUNCTION HSetDirAccess (vRefNum: Integer;
  139.                                     dirID: LongInt;
  140.                                     name: StringPtr;
  141.                                     ownerID: LongInt;
  142.                                     groupID: LongInt;
  143.                                     accessRights: LongInt): OSErr;
  144.  
  145.     FUNCTION FSpSetDirAccess ({CONST}
  146.                                     VAR spec: FSSpec;
  147.                                     ownerID: LongInt;
  148.                                     groupID: LongInt;
  149.                                     accessRights: LongInt): OSErr;
  150.  
  151.     FUNCTION HMapID (volName: StringPtr;
  152.                                     vRefNum: Integer;
  153.                                     ugID: LongInt;
  154.                                     objType: Integer;
  155.                                     name: StringPtr): OSErr;
  156.  
  157.     FUNCTION HMapName (volName: StringPtr;
  158.                                     vRefNum: Integer;
  159.                                     name: Str255;
  160.                                     objType: Integer;
  161.                                     VAR ugID: LongInt): OSErr;
  162.  
  163.     FUNCTION HCopyFile (srcVRefNum: Integer;
  164.                                     srcDirID: LongInt;
  165.                                     srcName: Str255;
  166.                                     dstVRefNum: Integer;
  167.                                     dstDirID: LongInt;
  168.                                     dstPathname: StringPtr;
  169.                                     copyName: StringPtr): OSErr;
  170.  
  171.     FUNCTION FSpCopyFile ({CONST}
  172.                                     VAR srcSpec: FSSpec;
  173.                                     {CONST}
  174.                                     VAR dstSpec: FSSpec;
  175.                                     copyName: StringPtr): OSErr;
  176.  
  177.     FUNCTION HMoveRename (vRefNum: Integer;
  178.                                     srcDirID: LongInt;
  179.                                     srcName: Str255;
  180.                                     dstDirID: LongInt;
  181.                                     dstpathName: StringPtr;
  182.                                     copyName: StringPtr): OSErr;
  183.  
  184.     FUNCTION FSpMoveRename ({CONST}
  185.                                     VAR srcSpec: FSSpec;
  186.                                     {CONST}
  187.                                     VAR dstSpec: FSSpec;
  188.                                     copyName: StringPtr): OSErr;
  189.  
  190.     FUNCTION GetVolMountInfoSize (volName: StringPtr;
  191.                                     vRefNum: Integer;
  192.                                     VAR size: Integer): OSErr;
  193.  
  194.     FUNCTION GetVolMountInfo (volName: StringPtr;
  195.                                     vRefNum: Integer;
  196.                                     volMountInfo: Ptr): OSErr;
  197.  
  198.     FUNCTION VolumeMount (volMountInfo: Ptr;
  199.                                     VAR vRefNum: Integer): OSErr;
  200.  
  201.     FUNCTION Share (vRefNum: Integer;
  202.                                     dirID: LongInt;
  203.                                     name: StringPtr): OSErr;
  204.  
  205.     FUNCTION FSpShare ({CONST}
  206.                                     VAR spec: FSSpec): OSErr;
  207.  
  208.     FUNCTION Unshare (vRefNum: Integer;
  209.                                     dirID: LongInt;
  210.                                     name: StringPtr): OSErr;
  211.  
  212.     FUNCTION FSpUnshare ({CONST}
  213.                                     VAR spec: FSSpec): OSErr;
  214.  
  215.     FUNCTION GetUGEntry (objType: Integer;
  216.                                     objName: StringPtr;
  217.                                     VAR objID: LongInt): OSErr;
  218.  
  219.  
  220. {***************************************************************************}
  221.  
  222. IMPLEMENTATION
  223.  
  224. END.